<?php /* Smarty version Smarty-3.1.11, created on 2012-10-08 12:11:51
         compiled from "_templates\donate\index.tpl" */ ?>
<?php /*%%SmartyHeaderCode:287255072a6e79e8ef5-12256152%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'e97e4cff62ba637729d620dd0d25b028b4f384d4' => 
    array (
      0 => '_templates\\donate\\index.tpl',
      1 => 1349677401,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '287255072a6e79e8ef5-12256152',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'total_earnings' => 0,
    'value' => 0,
    'item' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_5072a6e7c79825_32777475',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5072a6e7c79825_32777475')) {function content_5072a6e7c79825_32777475($_smarty_tpl) {?>
<article class="module width_full">
    <header><h3><?php echo $_smarty_tpl->getConfigVariable('title');?>
</h3></header>
	<table width="100%" cellpadding="3" cellspacing="1">
		<tr>
		<td class="header" style="font-weight:bold;"><?php echo $_smarty_tpl->getConfigVariable('total_earnings');?>
</td>
		<td class="header"><span style="float:right;background-color:#<?php if ($_smarty_tpl->tpl_vars['total_earnings']->value>=1){?>9DD1A9<?php }else{ ?>bd6a6a<?php }?>; font-weight:bold; color:#ffffff; text-align:right;"><?php echo $_smarty_tpl->tpl_vars['total_earnings']->value;?>
 <?php echo $_smarty_tpl->getConfigVariable('sign');?>
</span></td>
		</tr>
	</table>
		<div id="tablewrapper">
			<div id="tableheader">
				<div class="search">
					<select id="columns" onchange="sorter.search('query')">
			  <option value="-1"><?php echo $_smarty_tpl->getConfigVariable('columns');?>
</option>
			  </select>
					<input type="text" id="query" onkeyup="sorter.search('query')" />
				</div>
			<span class="details">
			  <div><?php echo $_smarty_tpl->getConfigVariable('entries');?>
 <span id="startrecord"></span>-<span id="endrecord"></span> <?php echo $_smarty_tpl->getConfigVariable('from');?>
 <span id="totalrecords"></span></div>
			  <div><a href="javascript:sorter.reset()"><?php echo $_smarty_tpl->getConfigVariable('reset');?>
</a></div>
			</span>
		  </div>
		<table cellpadding="0" cellspacing="0" id="table" class="tinytable" style="width:100%;" >
			<thead>
				<tr>
					<th align="center" class="header"><h3><?php echo $_smarty_tpl->getConfigVariable('admin');?>
</h3></th>
					<th align="center" class="header"><h3><?php echo $_smarty_tpl->getConfigVariable('date');?>
</h3></th>
					<th align="center" class="header"><h3><?php echo $_smarty_tpl->getConfigVariable('coins');?>
</h3></th>
					<th align="center" class="header"><h3><?php echo $_smarty_tpl->getConfigVariable('to');?>
</h3></th>
					<th align="center" class="header"><h3><?php echo $_smarty_tpl->getConfigVariable('reason');?>
</h3></th>
					<th align="center" class="header"><h3><?php echo $_smarty_tpl->getConfigVariable('donation');?>
</h3></th>
					<th align="right" class="header"><h3><?php echo $_smarty_tpl->getConfigVariable('action');?>
</h3></th>
				</tr>
			</thead>
			<tbody>
		<?php if (!empty($_smarty_tpl->tpl_vars['value']->value)){?>
		<?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['item']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['value']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
$_smarty_tpl->tpl_vars['item']->_loop = true;
?>							
			
			<script type="text/javascript">
				$(function() {
					$(".inv_button_<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
").click(function() {
						var id 					= '<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
';
						var dataString	= 'donate='+ id;
						var parent = $(this).parent();
					$.ajax({
						type: "POST",
						url: "_javascript/ajax_livedit.php",
						data: dataString,
						cache: false,
						success: function()
							{
								$("#maininv_<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
").fadeOut('slow', function() {$("#maininv_<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
").remove();});
							}
					});
					return false;
					});
				});
			</script>
			
			<tr id="maininv_<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
" style="background-color:<?php echo $_smarty_tpl->tpl_vars['item']->value['color'];?>
">
				<td align="center" class="body"><a style="color:#000000; font-weight:bold;" href="index.php?mod=profile&userID=<?php echo $_smarty_tpl->tpl_vars['item']->value['admin'];?>
" target="_blank"><?php echo $_smarty_tpl->tpl_vars['item']->value['adminname'];?>
</a></td>
				<td align="center" class="body"><?php echo $_smarty_tpl->tpl_vars['item']->value['timestamp'];?>
</td>
				<td align="center" class="body"><?php echo $_smarty_tpl->tpl_vars['item']->value['coins'];?>
</td>
				<td align="center" class="body"><a style="color:#000000; font-weight:bold;" href="index.php?mod=profile&userID=<?php echo $_smarty_tpl->tpl_vars['item']->value['userID'];?>
" target="_blank"><?php echo $_smarty_tpl->tpl_vars['item']->value['username'];?>
</a></td>
				<td align="center" class="body"><?php echo $_smarty_tpl->tpl_vars['item']->value['reason'];?>
</td>
				<td align="center" class="body"><?php echo $_smarty_tpl->tpl_vars['item']->value['amount'];?>
<?php echo $_smarty_tpl->getConfigVariable('sign');?>
</td>
				<td align="right" class="body"><a href="" class="inv_button_<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
"><img src="_images/icons/cross.png" alt="" /></a></td>
			</tr>
		<?php } ?>
		<?php }else{ ?>
			<tr>
				<td class="body"><?php echo $_smarty_tpl->getConfigVariable('nodonations');?>
</td>
				<td class="body"></td>
				<td class="body"></td>
				<td class="body"></td>
				<td class="body"></td>
				<td class="body"></td>
				<td class="body"></td>
			</tr>
		<?php }?>
		</tbody>
	 </table>
	   <div id="tablefooter">
		 <div id="tablenav">
		   <div>
			 <!--<img src="_images/icons/arrow_left.png" alt="First Page" onclick="sorter.move(-1,true)" />&laquo;-->
			 <img src="_images/icons/arrow_left.png" alt="First Page" onclick="sorter.move(-1)" />
			 <img src="_images/icons/arrow_right.png" alt="First Page" onclick="sorter.move(1)" />
			 <!--<img src="_images/icons/arrow_right.png" alt="Last Page" onclick="sorter.move(1,true)" />&raquo;-->
		   </div>
		   <div>
			 <select id="pagedropdown"></select>
		   </div>
		   <div class="page">
			 <a href="javascript:sorter.showall()"><?php echo $_smarty_tpl->getConfigVariable('see_all');?>
</a>
		   </div>
		 </div>
		 <div id="tablelocation">
		   <div>
			 <select onchange="sorter.size(this.value)">
			   <option value="5">5</option>
			   <option value="10" selected="selected">10</option>
			   <option value="20">20</option>
			   <option value="50">50</option>
			   <option value="100">100</option>
			 </select>
			 <span><?php echo $_smarty_tpl->getConfigVariable('entries_p_site');?>
</span>
		   </div>
		   <div class="page"><?php echo $_smarty_tpl->getConfigVariable('site');?>
 <span id="currentpage"></span> <?php echo $_smarty_tpl->getConfigVariable('from');?>
 <span id="totalpages"></span></div>
			 </div>
		 </div>
	 </div>
	<footer style="overflow:hidden;">
		<div class="submit_link">
			<a href="index.php?mod=donate&page=add"><input type="submit" value="<?php echo $_smarty_tpl->getConfigVariable('add_donation');?>
" class="alt_btn"></a>
		</div>
	</footer>
</article>
		
<script>



    var sorter = new TINY.table.sorter('sorter','table',{
      headclass:'head',
      ascclass:'asc',
      descclass:'desc',
      evenclass:'evenrow',
      oddclass:'oddrow',
      evenselclass:'evenselected',
      oddselclass:'oddselected',
      paginate:true,
      size:10,
      colddid:'columns',
      currentid:'currentpage',
      totalid:'totalpages',
      startingrecid:'startrecord',
      endingrecid:'endrecord',
      totalrecid:'totalrecords',
      hoverid:'selectedrow',
      pageddid:'pagedropdown',
      navid:'tablenav',
      sortcolumn:1,
      sortdir:1,
      init:true
    });
    </script>
    <?php }} ?>